package com.karaku.karaku_collector;

import android.app.Application;

import com.karaku.karaku_collector.collector.CollectorInfoManager;
import com.karaku.karaku_collector.util.MyBatteryManager;
import com.karaku.karaku_collector.util.ProcessUtil;
import com.karaku.karaku_collector.util.ScreenManager;
import com.umeng.analytics.MobclickAgent;

/**
 * Created by guoping on 2017/10/26.
 */

public class App extends Application {

    private static App instance;

    public static App getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;

        if (ProcessUtil.isMainProcess()) {
            MobclickAgent.startWithConfigure(new MobclickAgent.UMAnalyticsConfig(
                    getApplicationContext(), BuildConfig.UM_KEY, "default",
                    MobclickAgent.EScenarioType.E_UM_NORMAL, true
            ));
            MobclickAgent.setDebugMode(true);

            CollectorInfoManager.getInstance();
            ScreenManager.getInstance();
            MyBatteryManager.getInstance();
        }

    }

}
